<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
	<link rel="stylesheet" type="text/css" href="../js/themes/default/peasyui.css">
	<link rel="stylesheet" type="text/css" href="../js/themes/icon.css">
	<link rel="stylesheet" type="text/css" href="../demo/demo.css">
	<link rel="stylesheet" type="text/css" href="../css/coun.css"/>
	<script type="text/javascript" src="../js/jquery-1.8.3.min.js"></script>
	<script type="text/javascript" src="../js/template.js"></script>
	<script type="text/javascript" src="../js/jquery.easyui.min.js"></script>
	<script type="text/javascript" src="../js/locale/easyui-lang-zh_CN.js"></script>
	<script type="text/javascript" src="../js/plugins/jquery.datagrid.js"></script>
	<script type="text/javascript">
	  $(function() {

	       //设置datagrid
	  var lastIndex;
	  
	  $('#tt').datagrid({
	   width : 750,
	   height : 350,
	   //pageSize:5,
	   pageList : [ 5, 10, 15, 20 ],
	   pageSize:10,
	   nowrap : false,
	   striped : true,
	   collapsible : true,
	   url : 'content1.json',
	   loadMsg : '数据装载中......',
	   sortName : 'code',
	   sortOrder : 'desc',
	   idField : 'id',
	   remoteSort : false,
	   pagination : true,
	   rownumbers : true,
	   frozenColumns : [ [ {
	    field : 'ck',
	    checkbox : true
	   } ] ],            
	   toolbar : [ {
	    text : '添加',
	    iconCls : 'icon-add',
	    handler : function(){
	      $('#add').window('open');
	         $('#fs').show();
	         $('#fs').form('clear');
	         $('#fs').appendTo('#aa');
	    }
	   }, '-', {
	    text : '删除',
	    iconCls : 'icon-remove',
	    handler : del
	   }, '-', {
	    text : '保存',
	    iconCls : 'icon-save',
	    handler : function() {
	     $('#tt').datagrid('acceptChanges');
	    }
	   }, '-', {
	    text : '修改',
	    iconCls : 'icon-edit',
	    handler : getSelect
	   }, '-', {
	    text : '查询',
	    iconCls : 'icon-search',
	    handler : function() {
	     $('#query').window('open');
	    }
	   }, '-', {
	    text : '撤销',
	    iconCls : 'icon-undo',
	    handler : function() {
	     $('#tt').datagrid('rejectChanges');
	    }
	   } ],
	   onBeforeLoad : function() {
	    $(this).datagrid('rejectChanges');
	   }
	  });
	});
	</script>
<title>Insert title here</title>
</head>
<body>

 <table id="tt">
     <thead>
    <tr>
    <th field="id" width="80" >读者ID</th>
    <th field="name" width="100" >读者姓名</th>
    <th field="sex" width="80" >性别</th>
    <th field="type" width="80" >类型</th>
    <th field="email" width="80" >邮箱</th>
    <th field="company" width="150">单位</th>
    <th field="status" width="60">状态</th>
    </tr>
    </thead>
    </table>



   
</body>
</html>